<template>
    <Modal v-model="modal" width="360" height="400">
        <p slot="header" style="text-align:center">
            <Icon type="compose"></Icon>
            <slot name='modalName'></slot>
        </p>
        <div slot='body' style="text-align:center">
            <slot name='modalBody'></slot>
        </div>
        <div slot="footer">
            <Button type="error" size="large" long :loading="modal_loading" @click="close">关闭</Button>
            <Button type="success" size="large" long :loading="modal_loading" @click="sure">确定</Button>
        </div>
    </Modal>
</template>
<script>
export default {
    name: 'VModal',
    props: ['modal'],
    methods: {
        close() {
            this.$emit('close');
        },
        sure() {
            this.$emit('sure');
        }
    }
}   
</script>